package thread;

public class SleepDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        Thread t = new Thread(){
            public void run(){
                for (int i = 0; i < 10000; i++) {
                    System.out.println("来啊，快活啊");
                }
                System.out.println("程序结束了");
            }
        };
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        t.start();

    }
}
